﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Net;
using NetDiskPRJ.Common.DEncrypt;

namespace NetDiskPRJ.Base
{
    /// <summary>
    /// 定义相关的全局变量
    /// </summary>
    public static class GlobalParams
    {

        //public static string 
        /****************************
         * 原来PB定义的全局变量，可能在本系统中使用的，进攻参考
datastore gds_emp   // d_emp_linkway
datastore gds_wake_person_tran   // 保存需要提醒的个人事务

string    ini_file
//string    setup_path
// string    logid
string    fullname
constant  string    gs_errmsg="错误"
//constant string gs_serialno = "E2L0I0N1G0S6O2F8T"
string gs_ipaddr
string gs_computername
//////////////////////

// constant boolean DEBUG_SOURCE = false
string gs_version = '8.10'			// 2011.09.23 14:57

// 密码加密串值
constant  string gs_encryptvalue = "ZHEJIANG_NINGBO_FORTUNE_WANGZHUBAO_XIAYUJUN_ABCDEFGHIJKLMNSTOPQ"

// 数据库连接时，口令的加密串，用于dbpubinfo.connectinfo.password 字段
// constant string gs_dbencrytvalue = "FKLSDJALKFJAKS82374892317KLASDJFKJYKLJVU8945UF9082374NMADKU9NXVC783AKLFHUI3461ASDIOF"

// 注册表中数据库连接口令的加密串，用于注册表
// constant string gs_regencrytvalue = "ERHJAGNJIUYI43895JNSD7Y2JDFHSH1489YUVNZXJCTY723F892Q34ZCXHNVOU397NFIUDASY9T34VHJAUY"

string gs_logid

string gs_program_name = "易灵新家"

         * * **************************/
        /// <summary>
        /// 密码加密串值
        /// </summary>
        public const string GLOBAL_ENCRYPTVALUE = "ZHEJIANG_NINGBO_FORTUNE_WANGZHUBAO_XIAYUJUN_ABCDEFGHIJKLMNSTOPQ";
        /// <summary>
        /// 应用程序版本号
        /// </summary>
        public static string GLOBAL_VERSION;// = "8.10";
        /// <summary>
        /// 超级管理员列表
        /// </summary>
        public static string[] GLOBAL_ADMINLIST = { "sa", "admin" };
        /// <summary>
        /// 当前登录ID
        /// </summary>
        public static string GLOBAL_LOGID = "";
        /// <summary>
        /// 当前登录者名称
        /// </summary>
        public static string GLOBAL_LOGFULLNAME = "";
        /// <summary>
        /// 应用程序名称
        /// </summary>
        public static string GLOBAL_PROGRAMNAME = "易灵委托代征系统";

        public static string GLOBAL_EXTMASK = "FKASDJ9452KLJ89425LK23484320M4902AFDASFEC34958234SDFLIGUJDFSNM943L23MG934GRD43GWSDLJG904";

        /// <summary>
        /// 本机IP地址
        /// </summary>
        public static string GLOBAL_IPADDRESS = "";

        /// <summary>
        /// 本机机器名
        /// </summary>
        public static string GLOBAL_COMPUTENAME = "";
        /// <summary>
        /// sql连接字符串
        /// </summary>
        public static string GLOBAL_SQLCONNECTSTRING = "";
        /// <summary>
        /// 代征点编号
        /// </summary>
        public static string GLOBAL_ENTITY_NO = "";

        public static string IsAutoLogin;

        /// <summary>
        /// 是否取消
        /// </summary>
        public static bool GLOBAL_ISCANCEL = false;
        /// <summary>
        /// webserviceURL
        /// </summary>
        public static string NetDiskWebServiceAddress = DESEncrypt.Decrypt(System.Configuration.ConfigurationManager.AppSettings["WebServiceUrl"]);

        private static NetDiskService _netDiskService = null;
        /// <summary>
        /// 网盘webservice类
        /// </summary>
        public static NetDiskService NetDiskServiceSVC
        {
            get
            {
                if (_netDiskService == null)
                {
                    _netDiskService = new NetDiskService();
                }
                return _netDiskService;
            }
        }
        private static CookieContainer _cookieContainerObj = null;
        /// <summary>
        /// 传输cookie类
        /// </summary>
        public static CookieContainer CookieContainerObj
        {
            get
            {
                if (_cookieContainerObj == null)
                {
                    _cookieContainerObj = new CookieContainer();
                }
                return _cookieContainerObj;
            }
        }

       
      

    }
}
